
{extend name='public/base' /}

{block name="content"}

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="form">
                <input type="hidden" name="id" value="{$info.id}">
                <div class="layui-form-item">
                    <label class="layui-form-label">商户</label>
                    <div class="layui-input-block">
                        <input type="text"  value="{$info.merchants.name}" disabled autocomplete="off" placeholder="请输入需缴金额" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">缴费金额</label>
                    <div class="layui-input-block">
                        <input type="number" name="amount" value="{$info.real_amount/100}" disabled autocomplete="off" placeholder="请输入需缴金额" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-layout-admin " style="width: 100%">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0px;text-align: center;">
                            <button class="layui-btn" lay-submit="" lay-filter="confirm">确定</button>
                        </div>
                    </div>
                </div>
                <div class="layui-card">
                    <div class="layui-card-body">
                        <table class="layui-hide" id="table_id" lay-filter="table_id"></table>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

{/block}

{block name="js"} <!--js处理区-->


<script>
    layui.use(['element', 'table', 'form', 'jquery', 'lucky','opTable'], function () {
        var element = layui.element;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky=layui.lucky;
        var opTable = layui.opTable;
        var table = layui.table;
        var costType = {:json_encode($list)};
        var myTables = table.render({
            elem: '#table_id',
            id:'table_id',
            text: {
                none: '暂无相关数据'
            },
            cols: [[
                {title: 'id', field: 'id'},
                {title: '员工', field: 'name'},
                {title: '电话', field: 'phone'},
                {title: '费用', field: 'money'},
                {title: '证件', field: 'money', templet:function (item) {
                        return "<a class=\"layui-btn layui-btn-xs\" lay-event=\"see\">查看</a>"
                    }
                },
            ]],
            data: costType,
        });
        /**
         * 监听单行工具操作
         */
        table.on('tool(table_id)', function (obj) {
            var data = obj.data;
            var _id = parseInt(data.id);
            var layEvent = obj.event;
            if (layEvent === "see"){
                lucky.CreateOpenForm("查看", "{:url('see')}?id=" + _id);
                return  false;

            }
        });
        form.render();
    });

</script >

{/block}
